import ReplyDao from '../dao/ReplyDao'
// import { ShopCartRaw, ShopCartRaw_ } from '../raw'
import { combine } from '../../../modules/commontypes'
import { ReplyRaw } from '../util'

class ReplyService {
  static ReplyService = new ReplyService()

  async addReply(reply: ReplyRaw) {
    const dbReply = await ReplyDao.addReply(reply);
    // 合并 当前reply 合并 id 后返回
    const lastNewReply = combine({replyid:dbReply[0]},reply);
    return lastNewReply;
  }
}
export default ReplyService.ReplyService
